package se.webbzon.boltzmann.game.object.dialogue.factory;

import se.webbzon.boltzmann.game.object.dialogue.layout.DialogueLayout;
import se.webbzon.boltzmann.game.object.dialogue.word.AbstractDialogueWord;
import se.webbzon.boltzmann.game.object.dialogue.word.DynamicDialogueWord;

public class DynamicDialogueWordFactory extends AbstractDialogueWordFactory {

	// The name of key to the content of the dynamic word
	private final String keyName;

	/*============================================================
	Constructors
	============================================================*/

	/** Creates a new dynamic dialogue word factory with a given key
	 * to the content of the dynamic word. **/
	public DynamicDialogueWordFactory(String keyName) {
		this.keyName = keyName;
	}
	
	/*============================================================
	Public Methods
	============================================================*/
	
	@Override public AbstractDialogueWord createWord(DialogueLayout layout) {
		return new DynamicDialogueWord(layout,keyName);
	}

}
